public class TestDemo {
    public static void main(String[] args) {
        ResizingArrayStack<String> array =  new ResizingArrayStack<String>();
        array.push("你好");
        array.push("to");
        array.push("be");
        array.push("or");
        array.push("not");
        for (String str: array ) {
            System.out.print(str + "  ");
        }
        System.out.println(array.pop());
        System.out.println(array.pop());
        System.out.println(array.pop());
        System.out.println(array.pop());
        System.out.println(array.pop());
    }
}